# with open('../txt/pi_digits.txt') as file_object:
#     contents = file_object.read()
#     print(contents)

# 逐行读取
file_name = '..\\txt\\pi_digits.txt'

with open(file_name) as file_object:
    # for line in file_object:
    #     print(line.rstrip())
    lines = file_object.readlines()
pi_str = ''
for line in lines:
    # print(line.rstrip())
    pi_str += line.rstrip()

print(pi_str)
print(len(pi_str))
